HTMLify

style.css
Views: 35 | Author: cody
@import url("https://fonts.googleapis.com/css?family=Rubik:700&display=swap");

* {
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    min-height: 100vh;
    background: #fff;
}

button {
    position: relative;
    display: inline-block;
    cursor: pointer;
    outline: none;
    font-size: 1rem;
    font-family: "Rubik", sans-serif;
    font-weight: 600;
    line-height: 1.5;
    color: #382b22;
    text-transform: uppercase;
    padding: 1.25em 2em;
    background: #fff0f0;
    border: 2px solid #b18597;
    border-radius: 0.75em;
    transform-style: preserve-3d;
    transition: transform 150ms cubic-bezier(0, 0, 0.58, 1),
        background 150ms cubic-bezier(0, 0, 0.58, 1);
}

button::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    inset: 0;
    background: #f9c4d2;
    border-radius: inherit;
    box-shadow: 0 0 0 2px #b18597, 0 0.625em 0 0 #ffe3e2;
    transform: translate3d(0, 0.75em, -1em);
    transition: transform 150ms cubic-bezier(0, 0, 0.58, 1),
        box-shadow 150ms cubic-bezier(0, 0, 0.58, 1);
}

button:hover {
    background: #ffe9e9;
    transform: translate(0, 0.25em);
}

button:hover::before {
    box-shadow: 0 0 0 2px #b18597, 0 0.5em 0 0 #ffe3e2;
    transform: translate3d(0, 0.5em, -1em);
}

button:active {
    background: #ffe9e9;
    transform: translate(0em, 0.75em);
}

button:active::before {
    box-shadow: 0 0 0 2px #b18597, 0 0 #ffe3e2;
    transform: translate3d(0, 0, -1em);
}

Comments